{% load staticfiles %}
<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <title>{% block title %}{% endblock %}</title>
    <link href="{% static 'css/bootstrap.css' %}" rel="stylesheet">
    <meta name="viewport" content="width=device-width, initial-scale=1">
  </head>
  <body>
    {% include 'blog/header.html' %}
    <div class="container">
      {% if request.user.is_authenticated %}
        {% if request.user.profile.photo %}
          <div class="text-right"><img name="user_face" src="{{ request.user.profile.photo | striptags }}" alt="..." class="img-circle" id="my_photo"></div>
        {% else %}
          <div class="text-right"><img name="user_face" src="{% static 'images/p.png' %}" alt="..." class="img-circle" id="my_photo"></div>
        {% endif %}
        <p class="text-right" style="color:blue;">
        <a href="{% url 'account:edit' %}"><span class="glyphicon glyphicon-user" aria-hidden='true'>Hello {{request.user.username }}</span></a>
        <a class="glyphicon glyphicon-log-out" href="{% url 'account:logout'%}">Logout</a>
        {% else %}
         <a href="{% url 'account:login' %}">Login</a>
        {% endif %}
      </p>
      <p class="text-right"><a href="{% url 'account:password_change' %}">Change password</a></p>
   
    <div class="container">
      
      {% block content %}
      {% endblock %}
    </div>

    {% include 'blog/footer.html' %}
    {% block script %}
    {% endblock %}
  </body>
</html>